The present invention relates to Web site customization using cookies, and more particularly, to a method of extending the functionality of cookies to increase Web site performance.
Commercially available Web browsers such as Internet Explorer and Netscape Navigator support a mechanism by which a Web server can store persistent information on a user""s machine for subsequent retrieval. This information is commonly referred to as a xe2x80x9ccookie,xe2x80x9d and typically includes information about the user""s identity. The cookie is stored on the user""s computer as a name-value pair (NAME=VALUE), together with a URL (or range of URLs) to which the cookie corresponds and an optional expiration date. When the user initiates a request for a URL that corresponds to the cookie, the browser automatically sends the cookie (and any other cookies that correspond to the requested URL) to the host Web server with the URL request.
One common application for cookies involves dynamically customizing Web pages and functions for known users of a Web site. Typically, this involves storing known information about the user, such as a user ID, on the user""s computer in response to a page request. When the user subsequently accesses the Web site, the information contained within the cookie is used to access a back-end database to retrieve additional information about the user, such as the user""s preferences or account information. This database information may then be used to customize the requested Web page.
One problem with the above approach is that it requires frequent accesses to the database. For Web sites that experience many thousands of hits per day, the need to access the database can produce a significant performance degradation. The performance degradation may be the result of a limited load capacity of the database system, increased network traffic between physical Web servers and the database system, or both.
One potential solution to the above problem would be to store within cookies all of the user information needed to customize the Web pages, or at least the most frequently accessed Web pages. This would allow accesses to back-end databases during page requests to be reduced or avoided. Unfortunately, the existing cookies specification does not provide a mechanism for storing non-character data. Thus, for example, where the database information used to customize Web pages includes a list or table of 16-bit integers, storing such data within browser cookies is not a viable option. Further, the existing cookies specification does not provide a mechanism for allowing server software to keep track of versions of data elements contained within cookies.
The present invention overcomes this problem by providing a server system and process for storing selected data structures within browser cookies, preferably using a version tracking scheme to provide forward and backward compatibility between client and server software. The data structures may contain a variety of different types of data elements, including N-bit integers and other non-character elements. The process is implemented without the need for any browser extensions, and without the need for users to download any special code to their computers.
In a preferred embodiment, the system uses a schema file or other data structure that specifies past and present schemas for encoding data structures within cookies. A first server component uses the schema file to encode data structures into character strings that are stored within cookies on user computers. A checksum value, a length field, and a schema version number are also preferably encoded within the cookies. A second server component receives cookies from user computers, uses the schema file to identify the types of data structures stored in such cookies, and reproduces the data structures in local memory for temporary use. Application software uses these temporary data structures to generate personalized web pages and/or perform other custom operations.
FIG. 1 illustrates a Web site system according to a preferred embodiment of the invention.
FIG. 2 illustrates a preferred sequence of steps that are implemented by the host-to-cookie module of FIG. 1 to translate a sequence of structures to a cookie format.
FIG. 3 illustrates a preferred sequence of steps that are implemented by the cookie-to-host conversion module of FIG. 1 to convert a character string back to the original host representation.